using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Abp.Domain.Services;
using SOEI.Solution.StructEntities;

namespace SOEI.Solution.DomainEntities.PurQualificationAudit.DomainService
{
    /// <summary>
    /// 领域服务接口定义
    ///</summary>
    public interface IPurQualificationApplyManager : IDomainService
    {
        #region -------------------------------------------------辅助工具生成----------------------------------------------
        /// <summary>
        /// 返回表达式数的实体信息即IQueryable类型(可选择部分字段)
        /// </summary>
        /// <returns>IQueryable</returns>
        IQueryable<PurQualificationApply> QueryEntityListAsNoTracking();
        /// <summary>
        /// 返回表达式数的实体信息即IQueryable类型
        /// </summary>
        /// <returns>IQueryable</returns>
        IQueryable<PurQualificationApply> Query();
        /// <summary>
        /// 返回性能更好的IQueryable类型，但不包含EF Core跟踪标记
        /// </summary>
        /// <returns>IQueryable</returns>
        IQueryable<PurQualificationApply> QueryAsNoTracking();
        /// <summary>
        /// 【PurQualificationApply】根据Id查询实体信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns>实体</returns>
        Task<PurQualificationApply> FindByIdAsync(string id);
        /// <summary>
        /// 【PurQualificationApply】检查实体是否存在
        /// </summary>
        /// <returns>是否成功</returns>
        Task<bool> IsExistAsync(string id);
        /// <summary>
        /// 【PurQualificationApply】添加实体
        /// </summary>
        /// <param name="entity">实体</param>
        /// <returns></returns>
        Task<PurQualificationApply> CreateAsync(PurQualificationApply entity);
        /// <summary>
        /// 【PurQualificationApply】修改实体
        /// </summary>
        /// <param name="entity">实体</param>
        /// <returns></returns>
        Task UpdateAsync(PurQualificationApply entity);
        /// <summary>
        /// 【PurQualificationApply】删除实体
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task DeleteAsync(string id);
        /// <summary>
        /// 【PurQualificationApply】批量删除
        /// </summary>
        /// <param name="input">Id的集合</param>
        /// <returns></returns>
        Task BatchDelete(List<string> input);
        #endregion

        #region -------------------------------------------------用户自定义------------------------------------------------
        /*请在此扩展领域服务接口*/

        /// <summary>
        /// 【PurQualificationApply】更新实体
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<PurQualificationApply> MyUpdateAsync(PurQualificationApply entity);

        /// <summary>
        /// 通过关联查询获取外列表所需结果
        /// </summary>
        /// <returns></returns>
        IQueryable<PurQualificationApply> QueryUnionEntityListAsNoTracking();

        /// <summary>
        /// 获取新的购资审核申请序列编码
        /// </summary>
        /// <returns></returns>
        string GetNewSequenceCode();

        /// <summary>
        /// 获取新的家庭成员关系表序列编码
        /// </summary>
        /// <returns></returns>
        string GetSonNewSequenceCode();

        /// <summary>
        /// 提交审核
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        Task SubmitAudit(string Id);

        /// <summary>
        /// 获取新的购资审核变更信息表的序列
        /// </summary>
        /// <returns></returns>
        string GetGSChangeSequence();

        /// <summary>
        /// 获取家庭成员变更信息表的序列
        /// </summary>
        /// <returns></returns>
        string GetJTChangeSequence();

        /// <summary>
        /// 检查家庭成员是否在黑名单中
        /// </summary>
        /// <param name="purFamilyVerifyS"></param>
        /// <returns></returns>
        Task<string> Check_JTCYinHMD(List<PurFamilyVerifyS> purFamilyVerifyS);
        #endregion
    }
}
